<p>The directives contained in this module allow for manipulation
and control of URLs as requests arrive at the server. The
<code class="directive"><a href="#alias">Alias</a></code> and <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> directives are used to
map between URLs and filesystem paths. This allows for content
which is not directly under the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> served as part of the web
document tree. The <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> directive has the
additional effect of marking the target directory as containing
<h2><a name="order" id="order">Order of Processing</a></h2>
<p>Aliases and Redirects occuring in different contexts are processed
like other directives according to standard <a href="../sections.html#mergin">merging rules</a>. But when multiple
Aliases or Redirects occur in the same context (for example, in the
same <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>
section) they are processed in a particular order.</p>
<p>First, all Redirects are processed before Aliases are processed,
and therefore a request that matches a <code class="directive"><a href="#redirect">Redirect</a></code> or <code class="directive"><a href="#redirectmatch">RedirectMatch</a></code> will never have Aliases
applied. Second, the Aliases and Redirects are processed in the order
they appear in the configuration files, with the first match taking
precedence.</p>
<p>For this reason, when two or more of these directives apply to the
same sub-path, you must list the most specific path first in order for
all the directives to have an effect. For example, the following
configuration will work as expected:</p>
<div class="example"><p><code>
Alias /foo/bar /baz<br />
Alias /foo /gaq
</code></p></div>
<p>But if the above two directives were reversed in order, the
<p>The <code class="directive">ScriptAlias</code> directive has the same
behavior as the <code class="directive"><a href="#alias">Alias</a></code>
directive, except that in addition it marks the target directory
as containing CGI scripts that will be processed by <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a
(%-decoded) path beginning with <var>URL-path</var> will be mapped
to scripts beginning with the second argument which is a full
pathname in the local filesystem.</p>
<div class="example"><h3>Example:</h3><p><code>
ScriptAlias /cgi-bin/ /web/cgi-bin/
</code></p></div>
<p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the
server to run the script <code>/web/cgi-bin/foo</code>.</p>
<p><span>Available Languages: </span><a href="../en/mod/mod_alias.html" title="English"> en </a> |
<a href="../ja/mod/mod_alias.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_alias.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>